package design_pattern.lx3_single_pattern.lx_懒汉式2;

/**
 * @Author Mr.wang
 * @Description
 * @Date 2020-04-15
 */
public class Singleton {
    private static Singleton instance;

    private Singleton() {
    }

    public static synchronized Singleton getInstance() {
        if (instance == null) {
            instance = new Singleton();
        }
        return instance;
    }
}
